﻿@model StackExchange.Opserver.Data.Dashboard.Node
<div class="row small">
    <div class="col-md-6">
        <div class="panel panel-default">
            <div class="panel-heading">
                CPU Utilization
            </div>
            <div class="panel-body">
                <div class="history-graph" id="cpu-container"></div>
            </div>
        </div>
    </div>
    <div class="col-md-6">
        <div class="panel panel-default">
            <div class="panel-heading">Memory Utilization <span cass="text-muted">(@(Model.TotalMemory.GetValueOrDefault(0).ToSize()))</span></div>
            <div class="panel-body">
                <div class="history-graph" id="memory-container" data-max="@((Model.TotalMemory/1024/1024)?.ToString(CultureInfo.InvariantCulture))"></div>
            </div>
        </div>
    </div>
</div>
<script>
    $(function () {
        $('#cpu-container').cpuGraph({ id: '@Model.Id', realtime: true });
        $('#memory-container').memoryGraph({ id: '@Model.Id' });
    });
</script>
@if (Model.Interfaces.Any())
{
    @Html.Partial("Node.Interfaces", Model)
}

@if (Model.Services?.Any() == true)
{
    @Html.Partial("Node.Services", Model)
}

@if (Current.Settings.Dashboard.ShowVolumePerformance && Model.Volumes.Any())
{
    @Html.Partial("Node.Volumes", Model)
}
